<template>
	<view class="flex-col list-item section_7">
	  <view class="flex-row justify-between group_5 view">
	    <view class="flex-row space-x-7 text_7">
	      <text class="font_3">订单编号：</text>
	      <text @click="jumpDetails(infos,'orderDetails')" class="font_4 text_14">{{infos.orderNo || '-'}}</text>
	    </view>
	    <view class="flex-col items-center text_9 view_2"><text class="font_7">{{getCase(infos.level)}}</text></view>
	  </view>
	  <view class="flex-row space-x-8 group_6">
	    <text class="font_3">专利名称：</text>
	    <text class="font_5">{{infos.patentName || '-'}}</text>
	  </view>
	  <view class="flex-row space-x-8 group_7">
	    <text class="font_3">申请/专利号：</text>
	    <text @click="jumpDetails(infos,'patentDetails')" class="font_8 text_10 text_15">{{infos.patentNo || '-'}}</text>
	  </view>
	  <view class="flex-row space-x-7 group_8">
	    <text class="font_3">案件状态：</text>
	    <text class="font_5 text_11 text_16">{{infos.caseStatus || '-'}}</text>
	  </view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		props:{
			infos:{
				type:Object,
				default:()=>{}
			}
		},
		onLoad(option) {

		},
		methods:{
			getCase(index){
				if(!index) return '未授权';
				else if([1,2,3].includes(parseInt(index))) return '未授权';
				else if([4,5,6].includes(parseInt(index))) return '已授权';
				else if([7,8].includes(parseInt(index))) return '已失效';
				else return '未授权';
			},
			jumpDetails(info,type){
				if(type == 'patentDetails')
					uni.navigateTo({
						url:`../index/newdetails?patentNo=${info.patentNo}`
					})
				else 
					uni.navigateTo({
						url:`../order/orderDetails?id=${info.id}`
					})
			}
		}
	}
</script>

<style lang="scss" scoped>
.list-item {
  padding: 0 22rpx 30rpx 38rpx;
  background-color: #ffffff;
  .group_5 {
    padding: 29rpx 3rpx 18rpx;
    border-bottom: solid 1rpx #e2e2e2;
    .text_7 {
      margin-bottom: 3rpx;
    }
    .text_9 {
      margin-top: 6rpx;
      .font_7 {
        font-size: 19rpx;
        font-family: Microsoft YaHei;
        line-height: 18rpx;
        color: #37c967;
      }
    }
    .view_2 {
      margin-top: initial;
      margin-right: 17rpx;
      padding: 4rpx 0 6rpx;
      background-color: #fbfefc;
      border-radius: 4rpx;
      width: 90rpx;
      height: 30rpx;
      border: solid 1rpx #37c967;
    }
  }
  .view {
    padding: 29rpx 3rpx 15rpx;
  }
  .space-x-8 {
    & > view:not(:first-child),
    & > text:not(:first-child),
    & > image:not(:first-child) {
      margin-left: 8rpx;
    }
    .font_8 {
      font-size: 26rpx;
      font-family: Microsoft YaHei;
      line-height: 21rpx;
      color: #5372fc;
    }
    .text_10 {
      align-self: center;
    }
    .text_15 {
      align-self: initial;
      margin-top: 3rpx;
    }
  }
  .group_6 {
    margin-top: 21rpx;
    padding: 0 3rpx;
  }
  .font_3 {
    font-size: 26rpx;
    font-family: Microsoft YaHei;
    line-height: 26rpx;
    color: #777777;
  }
  .group_7 {
    margin-top: 24rpx;
    padding: 0 5rpx;
  }
  .space-x-7 {
    & > view:not(:first-child),
    & > text:not(:first-child),
    & > image:not(:first-child) {
      margin-left: 7rpx;
    }
    .font_4 {
      font-size: 26rpx;
      font-family: Microsoft YaHei;
      line-height: 21rpx;
      color: #444444;
    }
    .text_14 {
      margin-top: 6rpx;
    }
    .text_11 {
      align-self: center;
    }
    .text_16 {
      align-self: initial;
    }
  }
  .group_8 {
    margin-top: 26rpx;
    padding: 0 3rpx;
  }
  .font_5 {
    font-size: 26rpx;
    font-family: Microsoft YaHei;
    line-height: 26rpx;
    color: #444444;
  }
}
.section_7 {
  padding: 0 22rpx 29rpx 38rpx;
}
</style>